<!--
 * @Descripttion: 
 * @Author: YuZhenJing
 * @Date: 2020-06-21 11:16:10
 * @LastEditors: YuZhenJing
 * @LastEditTime: 2020-06-21 20:03:11
-->
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      // 理解 w 与 W 原字符
      // \w 表示 字母 数字 _
      let email = "yzj-office@qq.com";
      console.log(email.match(/^[\w-]+@\w+\.\w+$/));

      // \W 非字母、数字、_
      console.log("anyun@".match(/\W/));
    </script>
  </body>
</html>
